package com.lin.sqltool.model;

import java.util.ArrayList;
import java.util.List;

public class TableInfoModel {

    private String name;
    private List<FieldInfoModel> fields;
    private List<IndexInfoModel> indexes;

    public TableInfoModel(String name) {
        this.name = name;
        this.fields = new ArrayList<>();
        this.indexes = new ArrayList<>();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<FieldInfoModel> getFields() {
        return fields;
    }

    public void setFields(List<FieldInfoModel> fields) {
        this.fields = fields;
    }

    public List<IndexInfoModel> getIndexes() {
        return indexes;
    }

    public void setIndexes(List<IndexInfoModel> indexes) {
        this.indexes = indexes;
    }

    public void addField(FieldInfoModel field) {
        this.fields.add(field);
    }

    public void addIndex(IndexInfoModel index) {
        this.indexes.add(index);
    }
}
